import {defineConfig, loadEnv} from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
export default defineConfig(({mode}) => {
    const env = loadEnv(mode, __dirname)
    console.log(env)
    return {
        plugins: [vue()],
        base:'./',
        server: {
            port: env.VITE_PORT
        },
        build: {
            outDir: "app/render",
            assetsDir:''
        },
        alias:{
            "@/render":path.resolve(__dirname,'./src/render'),
            "@/main":path.resolve(__dirname,'./src/main'),
            "@/preload":path.resolve(__dirname,'./src/preload'),
            "@/util":path.resolve(__dirname,'./util'),
        }
    }
})